<template>
  <div>
    <h2>Home</h2>

    <h3>root</h3>

    <h3>cart</h3>
    {{ title }}-{{ num }}

    <h3>localShop</h3>
    {{ lsTitle }}-{{ lsNum }}

  </div>
</template>
<script>

import { mapState } from 'vuex';
// const m1 = mapState(['title', 'num']);
const m1 = mapState('cart', ['title', 'num']);
const m2 = mapState('shop/localShop', {
  lsTitle: 'title', lsNum: (state) => {
    return state.num;
  }
});
// const m2 = mapState('shop/localShop', ['title', 'num']);
export default {
  computed: {
    ...m1,
    ...m2,
  }
}
</script>